#include "DebugLED.h"
#include "DSP2833x_Device.h"

bool DebugLED::Init()
{
	// Configure GPIO32 as a GPIO output pin
	EALLOW;
	GpioCtrlRegs.GPBMUX1.bit.GPIO41 = 0;
	GpioCtrlRegs.GPBDIR.bit.GPIO41 = 1;
 	EDIS;
 	
 	Reset();
 	
	return true;
}

void DebugLED::Set()
{
	GpioDataRegs.GPBSET.bit.GPIO41 = 1;
}

void DebugLED::Reset()
{
	GpioDataRegs.GPBCLEAR.bit.GPIO41 = 1;
}

void DebugLED::Toggle()
{
	GpioDataRegs.GPBTOGGLE.bit.GPIO41 = 1;
}
